//美洽客服
function initMeiQia(callback) {
  (function (m, ei, q, i, a, j, s) {
    if(!window._MEIQIA){
      m[i] = m[i] || function () {
        (m[i].a = m[i].a || []).push(arguments)
      };
      j = ei.createElement(q),
        s = ei.getElementsByTagName(q)[0];
      j.async = true;
      j.charset = 'UTF-8';
      j.src = 'https://static.meiqia.com/dist/meiqia.js?_=t';
      s.parentNode.insertBefore(j, s);
      // console.log('_MEIQIA',_MEIQIA)
      callback();
      // console.log('j', j);
      // console.log('\'onload\' in j' , 'onload' in j);
    }
    else {
      callback();
    }
  })(window, document, 'script', '_MEIQIA');
}
export function runMeiqia() {
  //打开会话弹窗
  initMeiQia(function () {
    _MEIQIA('entId', '157038');//企业id 157038
    _MEIQIA('showPanel');
    _MEIQIA('withoutBtn');
  });
}
export function hideMeiQia() {
  //隐藏会话弹窗方法
  _MEIQIA('hidePanel');
}
